1. Field of the Invention
The present invention relates to an information recording/reproducing apparatus for realizing high-speed recording or reproducing by temporarily storing data to be transferred between an upper-level host computer and recording medium in a cache memory that is accessible at a high speed.
2. Description of the Related Art
In general, an information recording/reproducing apparatus such as an optical disk unit is used as an external recording apparatus relative to a host computer in an information processing system. Since writing or reading data in or from a recording medium is slower than data transfer between the recording medium and host computer, an information recording/reproducing apparatus having a cache memory as a go-between so that data can be transferred via the cache memory in order to speed up data recording or reproducing has been put to use in recent years. In particular, an optical disk unit using an optical disk as a recording medium generally includes a disk cache memory for temporarily storing record data or reproduced data because it takes too much time for writing data on the recording medium.
In relation to a storage control apparatus disclosed as an information recording/reproducing apparatus having such a cache memory in, for example, Japanese Unexamined Patent Publication No. 2-122345, a proposal has been made for a read-ahead type cache memory in which when a request for reading data is issued, not only data requested by a host computer is read but also data residing in a forward block is read in advance. According to this configuration, if data requested by the host computer is stored in the cache memory, the data is not read from a recording medium but transferred from the cache memory to the host computer. Thus, an access time required for reading can be shortened. Furthermore, the hit ratio of the number of successful accesses to the cache memory during reading can be improved owing to read-ahead reading.
Moreover, in an effort to improve an access time required for writing, an information recording/reproducing apparatus having a write-back type cache memory, in which after data is written in the cache memory, the data is written on a recording medium during an idle time of a CPU, has been proposed.
In this kind of information recording/reproducing apparatus, a ring-buffer type cache memory of which storage area is used continuously repeatedly is generally used as a cache memory. Data stored in the cache memory cannot therefore be retrieved during writing or reading. This poses a problem that the advantage of the cache memory cannot often be drawn out fully.
Proposed in Japanese Unexamined Patent Publication No. 3-176726 is an information recording/reproducing apparatus having a segmented cache type cache memory of which storage area is divided into a plurality of segments. Using this kind of segmented cache type cache memory, for example, data stored in the cache memory during previous writing can be retrieved during reading. When intended data resides in the cache memory, the data is read from the cache memory and transferred to a host computer. This leads to a higher processing speed.
In a conventional segmented cache type cache memory, the number of segments and the size of each segment are not determined through profound discussion. This poses a problem that in some cases or when a random Write command is received continuously, satisfactory performance cannot be expected. Moreover, there is a problem that when common firmware is used to realize an operation program to be run for operating a controller in order to reduce the cost of an information recording/reproducing apparatus, if the size of each segment is fixed, the number of segments becomes too small to draw out the advantage of the cache memory depending on the storage capacity of a cache memory.